library(haven)
library(dplyr)
library(expss)
iq_labels = c("91-95","96-100","101-105","106-110","111-115","116-120")
iq = 1:6
iq = factor(iq,labels=iq_labels)
method1_score = sort(pmax(pmin(round(rnorm(6,87,2.8),1),100),0))
method2_score = sort(pmax(pmin(round(rnorm(6,80,3.3),1),100),0))
method3_score = sort(pmax(pmin(round(rnorm(6,93,3.5),1),100),0))
df = data.frame(iq=iq,method_1=method1_score,method_2=method2_score,method_3=method3_score)
df=apply_labels(df,
             iq="IQ区块",method_1="方法1",method_2="方法2",method_3="方法3")
write_sav(df,file.path("data","ch5_exe_1.sav"))